package com.touchealth.test.demo;

import apple.laf.JRSUIUtils;
import lombok.Data;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.TreeMap;
import java.util.TreeSet;

public class DemoApplication {

    public static void main(String[] args) throws UnknownHostException {

        String url = "/EPlanform/data/HX/Upload/001/2020/09/07/";

        url = url.split("/")[5];


        System.out.println(url);

        Long test = 0L;

        System.out.print(test == 0);

        Integer num1 = 500;
        Integer num2 = 500;
        System.out.print(num1==num2);

        TreeMap<Integer, Bound> treeMap = new TreeMap<>();

        Bound bound1 = new Bound();
        bound1.setId(1);
        Bound bound2 = new Bound();
        bound1.setId(1);

        Bound result1=  treeMap.put(1,bound1);

        Bound result2 = treeMap.put(1, bound2);

        System.out.println(result1);
        System.out.println(result2);



    }
    @Data
    static
    class Bound implements Comparable{
        private Integer id;
        private String name;
        private String method;

        @Override
        public int compareTo(Object o) {
            Bound b = (Bound)o;
            if (this.id.equals(b.getId())){
              return 0;
            }
            return this.id.intValue() - b.getId().intValue();
        }
    }



}
